package com.dzx.controller;

import com.dzx.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Autowired
    TestService testService;

    @GetMapping("/hi")
    public String sayHi(@RequestParam(defaultValue = "dzx", required = false) String name) {
        return testService.sayHi(name);
    }
    @GetMapping("/hi2")
    public String sayHi2(@RequestParam(defaultValue = "dzx2", required = false) String name) {
        return testService.sayHi2(name);
    }

}
